package com.gudaomai.wuye.web;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.gudaomai.wuye.service.IButlerServ;

import io.swagger.annotations.ApiOperation;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author zenghualu
 * @since 2017-09-01
 */
@RestController
@RequestMapping("/wuye/butler")
public class ButlerCtrl extends BaseController {
	
	@Autowired
	IButlerServ butlerServ;

	/**
	 * 查询tb_butler，获取所有管家的姓名 1.主要操作，在tb_butler里获取staff_id 2.查询数据库tb_staff表，获取姓名
	 * 
	 * @return
	 * @throws Exception
	 */
	@ApiOperation("获取所有的管家姓名")
	@RequestMapping(value = "/allButlerName", method = RequestMethod.GET)
	public List<String> getAllButler() throws Exception {

		return butlerServ.getButlersName();
	}
}
